package com.walsai.pcsys.web.controller;


import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.springframework.web.servlet.ModelAndView;
import org.springframework.web.servlet.mvc.AbstractController;


import com.walsai.pcsys.core.service.ContestManager;


public class ContestController extends AbstractController{

	private ContestManager contestManager;
	
	public void setcontestManager(ContestManager contestManager){
		this.contestManager = contestManager;
	}
	
	@Override
	protected ModelAndView handleRequestInternal(HttpServletRequest request,
			HttpServletResponse response) throws Exception {
		// esto es para saber el usuario (pues se tiene que poner si ya se ha inscrito)
	/*
		HttpSession session = request.getSession();
		User user = (User)session.getAttribute("userInfo");
		user.getId();
	*/
		
		request.getSession().setAttribute("x", false);
		return new ModelAndView("contestview","contestform",contestManager.getAll());
	}

	

}
